﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace CatsAndMice.Models
{
    public class Dice : AbstractModel
    {
        private Random RNG = new Random();
        internal const int MIN_VALUE = 1;
        internal const int MAX_VALUE = 6;

        public Dice() : base(-1) {}

        private int _value = -1;
        public int Value
        {
            get
            {
                return _value;
            }
            set
            {
                SetProperty(ref _value, value, () => Value);
            }
        }

        public void Roll() {
            SetProperty(ref _value, RNG.Next(MIN_VALUE, MAX_VALUE + 1), () => Value, false);
        }
    }
}
